package org.fund.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.fund.base_service.domain.Position;
import org.fund.base_service.service.impl.IndexService;
import org.fund.common.core.domain.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Moro
 * @Date 2022/3/25 15:55
 * @title IndexController
 */
@RestController
@Api(tags = "首页")
public class IndexController {

    @Autowired
    private IndexService indexService;
    @ApiOperation("首页")
    @GetMapping("/index")
    public BaseResult<Position> getAll(){
        return BaseResult.success(indexService.getAllByUserId());
    }

}
